package _2022;

import java.math.BigInteger;

public class A {
	public static void main(String[] args) {
		BigInteger num = new BigInteger("20");
		BigInteger sum = null;
		for(int i=0;i<21;i++) {
			 sum= num.multiply(num);
		}
		BigInteger aBigInteger = sum.mod(new BigInteger("7"));
		int x = aBigInteger.intValue();
		if(x==0) System.out.println(6);
		else if(x==1) System.out.println(7);
		else System.out.println(x-1);
	}
}
